fix: set up buildx driver for dockers_v2 sbom attestation in release - #724
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe tagged ChangesRelease container build setup
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the release workflow to ensure Docker Buildx is configured during tagged releases, addressing a GoReleaser failure when building multi-arch Docker images with SBOM attestation.
Changes:
- Add a QEMU setup step to enable multi-architecture builds in the release job.
- Add a Docker Buildx setup step so
docker buildx build --attest=type=sbomruns with a compatible driver before the Docker Hub publish step.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
For fixing this issue during the goreleaser run
https://github.com/openfga/cli/actions/runs/29270705836/job/86888153455
dockers_v2 migration changed the buildx command GoReleaser runs. It now builds a multi-platform image (--platform linux/amd64,linux/arm64) with SBOM attestations (--attest=type=sbom). Both of those require BuildKit running under the docker-container driver.
Our release job never initialized buildx, so it fell back to the default docker driver, which supports neither multi-platform manifests nor attestations. That's the exact error the release hit:
The old dockers: (v1) config built single-platform images per arch with no attestations, so the default driver was fine — which is why this never failed before the migration.
Adding docker/setup-buildx-action creates a docker-container builder that supports both, and docker/setup-qemu-action provides the arm64 emulation needed to cross-build the arm64 image on the amd64 runner. This is also the setup GoReleaser's own docs recommend for multi-arch image builds.
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
mainSummary by CodeRabbit